package com.ruoyi.ethnicity.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.ethnicity.mapper.TbEthnicityMapper;
import com.ruoyi.ethnicity.domain.TbEthnicity;
import com.ruoyi.ethnicity.service.ITbEthnicityService;

/**
 * 民族信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-02
 */
@Service
public class TbEthnicityServiceImpl implements ITbEthnicityService 
{
    @Autowired
    private TbEthnicityMapper tbEthnicityMapper;

    /**
     * 查询民族信息
     * 
     * @param id 民族信息主键
     * @return 民族信息
     */
    @Override
    public TbEthnicity selectTbEthnicityById(Long id)
    {
        return tbEthnicityMapper.selectTbEthnicityById(id);
    }

    /**
     * 查询民族信息列表
     * 
     * @param tbEthnicity 民族信息
     * @return 民族信息
     */
    @Override
    public List<TbEthnicity> selectTbEthnicityList(TbEthnicity tbEthnicity)
    {
        return tbEthnicityMapper.selectTbEthnicityList(tbEthnicity);
    }

    /**
     * 新增民族信息
     * 
     * @param tbEthnicity 民族信息
     * @return 结果
     */
    @Override
    public int insertTbEthnicity(TbEthnicity tbEthnicity)
    {
        return tbEthnicityMapper.insertTbEthnicity(tbEthnicity);
    }

    /**
     * 修改民族信息
     * 
     * @param tbEthnicity 民族信息
     * @return 结果
     */
    @Override
    public int updateTbEthnicity(TbEthnicity tbEthnicity)
    {
        return tbEthnicityMapper.updateTbEthnicity(tbEthnicity);
    }

    /**
     * 批量删除民族信息
     * 
     * @param ids 需要删除的民族信息主键
     * @return 结果
     */
    @Override
    public int deleteTbEthnicityByIds(Long[] ids)
    {
        return tbEthnicityMapper.deleteTbEthnicityByIds(ids);
    }

    /**
     * 删除民族信息信息
     * 
     * @param id 民族信息主键
     * @return 结果
     */
    @Override
    public int deleteTbEthnicityById(Long id)
    {
        return tbEthnicityMapper.deleteTbEthnicityById(id);
    }
}
